New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ramips: add initial support for TP-LINK TL-WR840N v4 #974
ramips: add initial support for TP-LINK TL-WR840N v4 #974
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only LAN LED indicates activity only on LAN port 2. The LAN LED
seems to be hardwired to the internal switch, port 2.
Hi. Did You try fix it by adding "ephy" or "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", to pinctrl0?
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_RESTART>; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this unnecessary line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
}; | ||
|
||
ethernet { | ||
label = "tl-wr840n-v4:green:ethernet"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think better name for this led is lan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree. User gude contains description "ethernet", but fixed.
}; | ||
|
||
internet { | ||
label = "tl-wr840n-v4:green:internet"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here wan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
/dts-v1/; | ||
|
||
#include <dt-bindings/input/input.h> | ||
#include <dt-bindings/gpio/gpio.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong alphabetical first gpio.h than input.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
set_wifi_led "$board:green:wireless" | ||
ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" eth0.1 | ||
ucidef_set_led_netdev "wan" "wan" "$board:green:internet" eth0.2 | ||
ucidef_set_led_default "wps" "wps" "$board:green:wps" "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop ucidef_set_led_default here. They shouldn't be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
d52dff0
to
f9afa6e
Compare
I have tried all of them - ephy and pxled_an.
I'm unable to switch pins 39-43 to gpio and manually control LAN LEDS. Please, any idea? Update 2017/03/24: The same the pin p0led_an for the WAN LED. |
IMAGE_SIZE := 7808k | ||
DEVICE_TITLE := TP-Link TL-WR840N v4 | ||
DEVICE_PACKAGES := | ||
KERNEL := $(KERNEL_DTB) | prepend-to 448 | uImage lzma |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the existing pad-extra
instead of your custom prepend-to.
pad-extra 448 | $(KERNEL_DTB) | uImage lzma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid it's not possible.
KERNEL_DTB = kernel-bin | patch-dtb | lzma
Calling pad-extra before making KERNEL_DTB causes, that all leading zeroes crated by pad-extra are subject of lzma a will be comprimed:(
I can't find better/simpler solution.
This patch adds initial support for wireless router TP-LINK TL-WR840N v4. Specification: - SoC: MediaTek MT7628NN (580MHz) - RAM: 64 MiB (Winbond W9751G6JB-25) - Flash: 8 MiB (GigaDevice GD25Q64CSIG) - LAN: 4x 100M - WAN: 1x 100M - Antennas: 2x non-detachable - LED: 5x green - Buttons: 1x reset Instalation: TP-Link firmware uses recent firmware v3 header, please see https://github.com/xdarklight/mktplinkfw3. Therefore direct upgrade from TP-Link web UI is not supported yet. Upgrade from the TP-Link firmware is possible using common TFTP recovery mode. Rename file lede-ramips-mt7628-tl-wr840n-v4-squashfs-factory.bin to tp_recovery.bin and put it on a TFTP server with IP 192.168.0.66. Hold reset buton when connecting power until TFTP transfer begins. For upgrade from LEDE use generic sysupgrade method. LEDE uses uImage firmware header instead of the TP-Link v3 firmware header. In order to recover the original TP-Link firmware please use TFTP recovery mode. The header has to be removed from the original firmware: dd if=TL-WR840Nv4_0.9.1_3.16_up_boot\(161011\).bin \ bs=512 skip=1 > tp_recovery.bin Signed-off-by: Vaclav Svoboda <svoboda@neng.cz>
f9afa6e
to
8706b60
Compare
Totally missed that you managed to fix the LED issue. Better add a new comment next time so that everyone gets noticed. I'm still struggling to understand why this extra padding is required. What I might to understand so far is that the 128KByte extra padding of the factory image is used to ensure that the tftp recovery doesn't overwrite the bootloader. The 448 bytes extra padding is required since you don't create a valid tp-link header, right? Assuming that the bootloader works the same way as the lantiq tp-link uboots, the padding can be dropped by using a valid tp-link header as it is done in target/linux/lantiq/image/tp-link.mk. It still doesn't create a valid v3 tp-link header that is accepted by the tp-link webinterface, but it creates a tp-link header where the update u-boot flag is unchecked. Any chance that you give it a try or are you done with it? Edit: To get the firmware splitter working with the TP-Link header, you need to add
to |
@mkresin
|
@svobodavac any update on using the TP-Link header instead of faking it? Would you please rebase your PR to fix the conflicting files. |
So far router seems to work. I found only one major problem. This is wifi txpower. Seems it is working on 25mw or sort of power which is too low. You loose the device in the next room. root@lede-router:~# iwinfo wlan0 info root@lede-router:~# iwinfo wlan0 txpowerlist Power selection is missing. |
I will close this Pull Request due to inactivity. Please reopen the PR if you have the time to fix the outlined issues. |
oh boy ... It's a shame I know nothing abt this so I could help.I was looking foward to it because i bought this router 3 weeks ago w/o knowing it has no custom firmwares available =/ ... Well, I hope some good guy can keep this request going ... I'm cheering fo it =) |
help error "git apply 974.patch" |
|
||
&wmac { | ||
status = "okay"; | ||
mtd-mac-address = <&factory 0xf100>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to investigate poor wireless performance, which was described by @sanitariu
The thing I noticed here is that the EEPROM address was not defined, so it uses default value from mt7628an.dtsi, which is wrong for this hardware:
mediatek,mtd-eeprom = <&factory 0x0000>;
Real EEPROM is located in radio partition, so we must declare this:
&spi0 {
...
m25p80@0 {
...
radio: partition@07f0000 {
...
&wmac {
...
mediatek,mtd-eeprom = <&radio 0x0000>;
};
But performance is still bad though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make some patch for the correct eeprom ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are the author of this https://raxp.ru/index.php/2017/06/21/lede-for-wr841n-v13wr840n-v4-ru/ ?
Can share the developments?
Can you give me the link to download the firmware |
I'm also interested in this firmware. |
No link. Just get the source and compile. Wifi performance is really bad so do not use in production. |
@sanitariu Overall performance or distance performance ? |
@sanitariu im interested in computing performance not Wifi, how can i compile it? |
Its not so hard. Just clone the code. Do make menuconfig choose the arch you like and then compile with make. Output files will be in bin folder. |
@sanitariu Do you think wifi performance is related to TX power problem ? |
Support for 840Nv4 and 841Nv13 was added recently , please check 24043a0 . I'm testing some wireless performance problems. It would be of great help if ppl could test and give feedback. |
Wifi is still bad. The command "iwinfo wlan0 txpowerlist" does not show actual txpower but i think it is set default 30 or 50mw. I compared to tp-link 740 version 4 which is 63mw and i see it stronger in the next room. |
Please use the LEDE forum for any further discussion or send a mail to the LEDE devel mailing list. This PR was never merged, support for the TL-WR840N was added with 24043a0. |
This patch adds initial support for wireless router TP-LINK TL-WR840N v4.
Specification:
Instalation:
TP-Link firmware uses recent firmware v3 header, please see
https://github.com/xdarklight/mktplinkfw3.
Therefore direct upgrade from TP-Link web UI is not supported yet.
Upgrade from the TP-Link firmware is possible using common TFTP recovery mode.
Rename file lede-ramips-mt7628-tl-wr840n-v4-squashfs-factory.bin
to tp_recovery.bin and put it on a TFTP server with IP 192.168.0.66.
Hold reset buton when connecting power until TFTP transfer begins.
For upgrade from LEDE use generic sysupgrade method.
LEDE uses uImage firmware header instead of the TP-Link v3 firmware
header. In order to recover the original TP-Link firmware please
use TFTP recovery mode. The header has to be removed from
the original firmware:
dd if=TL-WR840Nv4_0.9.1_3.16_up_boot(161011).bin
bs=512 skip=1 > tp_recovery.bin
Currently not working:
The only LAN LED indicates activity only on LAN port 2. The LAN LED
seems to be hardwired to the internal switch, port 2.
Signed-off-by: Vaclav Svoboda svoboda@neng.cz